@model List<CrazyToDo.Web.Models.MatterViewModel>
    @{
    Layout = null;
    }

    <ul>
    @foreach (var item in Model)
    {
        if (item != null)
        {
            if (item.State == false)
            {
            <li>
                <span class="input-group-addon">
                    <input type="checkbox" id="check" onclick="changeState(@item.Id,@item.InventoryId)">
                </span>
                <span class="input-group-delete">
                    <img src="~/Home/img/删除(1).png" class="delete" onclick="DeleteMatterInInventory(@item.InventoryId,@item.Id)" />
                </span>
                <p type="text" id="UnfinishMatter" class="form-control"> @item.Content </p>

            </li>

            }
            else
            {

            <li>
                <span class="input-group-addon">
                    <input type="checkbox" id="check" checked="checked" onclick="changeState(@item.Id,@item.InventoryId)">
                </span>
                <span class="input-group-delete">
                    <img src="~/Home/img/删除(1).png" class="delete" onclick="DeleteMatterInInventory(@item.InventoryId,@item.Id)" />
                </span>
                <p type="text" id="finishMatter" class="form-control"> @item.Content </p>
            </li>
            }

        }


    }

    </ul>
<button id="addMatterToInventory" data-toggle="modal" data-target="#MyModal">添加事项</button>
<div class="modal fade" id="MyModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <form action="~/Inventory/AddMatterToInventory" method="post">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                        &times;
                    </button>
                    <h4 class="modal-title" id="myModalLabel">事项</h4>
                </div>
                <div class="modal-body">
                    <div class="form-group">
                        <label for="name">内容</label>
                        <input type="text" class="form-control" name="content"
                               placeholder="请输入内容">
                        <label for="name">备注</label>
                        <input type="text" class="form-control" name="remark"
                               placeholder="请输备注">
                        <label for="name">结束时间</label>
                        <input type="datetime-local" class="form-control" name="overdueTime"
                               placeholder="请输入结束时间">
                        @foreach (var item in Model)
                        {
                            <input type="text" class="form-control" name="listId" id="transportLIstId" value=" @item.InventoryId">
                            break;
                        }
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">
                        关闭
                    </button>
                    <button type="submit" class="btn btn-primary">
                        添加
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>















